import MessageHandler from "@runtime/module/Handler/MessageHandler";
import { ClientMessage } from "@runtime/generate/message/ClientMessage";
import LabelComponent from "@runtime/UnityEngineBridge/LabelComponent";

/**
 * 标签刷新消息
 */
export default class LabelUpdateMessageHandler extends MessageHandler<ClientMessage.LabelUpdateMessage> {
    protected async RunAsync(message: ClientMessage.LabelUpdateMessage): Promise<void> {
        // console.log(message.Informations, '刷新的信息+++++++');
        // MenuIndexData.Default.LabelDataList.value = message.Informations
        for (const information of message.Informations) {
            LabelComponent.Default.Update(information);
        }
    }
}
